Object.defineProperty(exports, "__esModule", {
    value: !0
});

var t = function(t) {
    return t && t.__esModule ? t : {
        default: t
    };
}(require("../../../utils/api2"));

exports.default = {
    addTo: function(i, s) {
        var o = s.sid;
        Object.assign(i, {
            $$getGrouponList: function() {
                return this.GrouponListPromise || (this.GrouponListPromise = t.default.site.groupon.lists({
                    data: {
                        sid: o,
                        status: "starting",
                        offset: 0,
                        limit: 4
                    },
                    desc: "获取活动列表"
                })), this.GrouponListPromise;
            },
            $$editorAddGroupon: function(t) {
                var i = this;
                this.$$getGrouponList().then(function(s) {
                    var o = s.lists;
                    i.$$editorAddSection({
                        type: "groupon",
                        data: {
                            list: o
                        }
                    }, t);
                });
            }
        });
    }
};